<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

//database connection parameters
Connection connection = null;
Statement statement = null;
ResultSet result = null;
String sql = null;

// 
String exectype = request.getParameter("type");
String title = request.getParameter("title");
String info = request.getParameter("info");

try{
	String driver = "org.h2.Driver";
	String url = "jdbc:h2:~/adolfmc-blog";
	String name = "sa";
	String password  = "";
	
	
	Class.forName(driver);
	connection = DriverManager.getConnection(url,name,password);
	statement = connection.createStatement();
	
	Date date = Calendar.getInstance().getTime();
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
	sdf.format(Calendar.getInstance().getTime());
	
	sql = "insert into blog_info (id,title,info) values ("+System.currentTimeMillis()+",'"+title+"','"+info+"')";
	statement.execute(sql);	
	connection.commit();

	sql = "select * from blog_user ;";
	result = statement.executeQuery(sql);

	out.println("date -----> result rows is  :"+result==null?null:result.getRow());
	out.println(result);
}catch(Exception ex){
	ex.printStackTrace();
}

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0057)http://blog.home.blogbus.com/6434953/posts/189602822/form -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>修改日志_博客大巴</title>
<link rel="stylesheet" href="../css/style.css" type="text/css">
<script type="text/javascript" src="../script/jquery.js"></script>
<script type="text/javascript" src="../script/jquery.pngFix.pack.js"></script>
<script type="text/javascript" src="../script/picobox.js"></script>
<script type="text/javascript" src="../script/picobox_beauty.js"></script>
<script type="text/javascript" src="./saved_resource"></script>
<script type="text/javascript" src="../script/cities2.js"></script>
<link rel="stylesheet" href="../css/style.css" type="text/css">
<link rel="stylesheet" href="../css/picobox.css" type="text/css">
<link rel="stylesheet" href="../css/picobox_beauty.css" type="text/css">
<link rel="stylesheet" href="../css/blog.css" type="text/css">
<script language="javascript">
function confirmDel() {
	var ids = getChecked();
	if (ids.length == '') {
		alert('请选择要删除的记录。');
		return false;
	}
	if (!confirm('真的要删除选中的记录吗？')) {
		return false;
	}
	return true;
}
</script>
<link rel="stylesheet" href="http://www.blogbus.com/user/tiny_mce/themes/advanced/skins/default/ui.css?4">
<link rel="stylesheet" href="http://www.blogbus.com/user/tiny_mce/plugins/inlinepopups/skins/blogbus/window.css?4"></head>
<body>
		<div id="wrapper">
			<div id="header">
				<div class="globeNavi">
					<a href="http://www.blogbus.com/" target="_blank" class="home">首页</a>|
					<a href="http://pindao.blogbus.com/" target="_blank">频道</a> |
					<a href="http://blog.blogbus.com/" target="_blank">群博录</a> |
					<a href="http://kanfa.blogbus.com/" target="_blank">看法</a> |
					<a href="http://bbs.blogbus.com/" target="_blank">论坛</a> |
					<a href="http://www.blogbus.com/help/" target="_blank">帮助</a> |
					<a href="http://passport.blogbus.com/logout?goto=http%3A%2F%2Fhome.blogbus.com%2Flogout">退出</a>
				</div>
				<script type="text/javascript">
				function toggleMenu(selector){
					$(selector).toggle('fast');
				}
				</script>

				<a href="http://home.blogbus.com/edit/">
					<img src="../image/avatar_11722396_48.jpg" alt="" class="avatar" width="48px" height="48px" ></img>
				</a>

				<h1>
					<span class="userInfo">
						<span class="userInfo">adolfcc</span>&nbsp;
						<span class="greeting" title="2012年1月31日 星期二"><strong></strong>&nbsp;&nbsp;</span>
					</span>
				</h1>

				<div class="subInfo">
					<div class="weather pub_dropmenuP">
						
					</div>
					<div class="services">
						<a href="http://home.blogbus.com/vip/" class="vip" target="_blank">VIP服务</a>
						<a href="http://friend.home.blogbus.com/notice" class="fpm1">好友邀请(0)</a>
                        <a href="http://message.home.blogbus.com/received" class="pm1">短消息(<b>3</b>)</a>
					</div>
					<div class="clear"></div>
				</div>
				<div class="mainNavi">
					<ul class="menus">
						<li class="first menuIndexClass">
							<a href="http://www.blogbus.com/user"><strong>管理中心</strong>
							</a>
						</li>
						<li class="menuBlogClass actived">
							<a href="http://blog.home.blogbus.com/posts"><strong>博客</strong>
							</a>
						</li>
						<li class="menuFileClass">
							<a href="http://file.home.blogbus.com/"><strong>文件</strong>
							</a>
						</li>
						<li class="menuFriendClass">
							<a href="http://friend.home.blogbus.com/minifeed"><strong>友邻</strong>
							</a>
						</li>
						<li class="menuTopicClass">
							<a href="http://topic.home.blogbus.com/"><strong>活动</strong>
							</a>
						</li>
					</ul>

					<div id="appSubMenuBlock" class="subMenus"
						style="padding-left: 24px;">
						<div class="subMenus" id="blog">
							<a class="submenuNewPost actived"
								href="http://blog.home.blogbus.com/6434953/posts/form">写新日志</a>
							|
							<a class="submenuPost"
								href="http://blog.home.blogbus.com/6434953/posts">日志</a> |
							<a class="submenuSkin"
								href="http://blog.home.blogbus.com/6434953/skins/blogbus_public_skins">模板</a>
							|
							<a class="submenuComment"
								href="http://blog.home.blogbus.com/6434953/comments/items">评论</a>
							|
							<a class="submenuTrackback"
								href="http://blog.home.blogbus.com/6434953/trackback">引用</a> |
							<a class="submenuSort"
								href="http://blog.home.blogbus.com/6434953/categories">分类</a> |
							<a class="submenuTag"
								href="http://blog.home.blogbus.com/6434953/tags">标签</a> |
							<a class="submenuBlogLink"
								href="http://blog.home.blogbus.com/6434953/bloglink/items">博链</a>
							|
							<a class="submenuLink"
								href="http://blog.home.blogbus.com/6434953/links">友情链接</a> |
							<a class="submenuSetting"
								href="http://blog.home.blogbus.com/6434953/settings/basic">博客设置</a>
							|
							<a class="submenuStat"
								href="http://blog.home.blogbus.com/6434953/stat">访问统计</a> |
							<a class="submenuAllBlog"
								href="http://blog.home.blogbus.com/user_blog/blogs">全部博客</a>
						</div>
					</div>
				</div>
			</div>
			<div id="allSubMenus" style="display: none;">
				<div id="menuIndex" style="padding-left: 24px;">
					<a href="http://home.blogbus.com/" class="submenuIndex">管理中心</a> |
					<a href="http://home.blogbus.com/my" class="submenuShow">个人信息</a> |
					<a href="http://home.blogbus.com/edit" class="submenuEdit">个人信息设置</a>
					|
					<a href="http://home.blogbus.com/privacy" class="submenuPrivacy">隐私设置</a>
					|
					<a href="http://home.blogbus.com/vip/index" class="submenuVip">VIP管理</a>
					|
					<a href="http://passport.blogbus.com/users/"
						class="submenuPassword" target="_blank">通行证管理</a>
				</div>
				<div id="menuBlog" style="padding-left: 24px;">
					<a class="submenuNewPost actived"
						href="http://blog.home.blogbus.com/posts/form">写新日志</a> |
					<a class="submenuPost" href="http://blog.home.blogbus.com/posts">日志</a>
					|
					<a class="submenuSkin"
						href="http://blog.home.blogbus.com/skins/blogbus_public_skins">模板</a>
					|
					<a class="submenuComment"
						href="http://blog.home.blogbus.com/comments/items">评论</a> |
					<a class="submenuTrackback"
						href="http://blog.home.blogbus.com/trackback">引用</a> |
					<a class="submenuSort"
						href="http://blog.home.blogbus.com/categories">分类</a> |
					<a class="submenuTag" href="http://blog.home.blogbus.com/tags">标签</a>
					|
					<a class="submenuLink" href="http://blog.home.blogbus.com/links">友情链接</a>
					|
					<a href="http://blog.home.blogbus.com/bloglink/items"
						class="submenuBloglink">博链</a> |
					<a class="submenuSetting"
						href="http://blog.home.blogbus.com/settings/basic">博客设置</a> |
					<a class="submenuStat" href="http://blog.home.blogbus.com/stat">访问统计</a>
					|
					<a class="submenuAllBlog"
						href="http://blog.home.blogbus.com/user_blog/blogs">全部博客</a>
				</div>
				<div id="menuChannel" style="padding-left: 24px;">
				</div>
				<div id="menuFile" style="padding-left: 195px;">
					<a href="http://file.home.blogbus.com/documents/item">文件上传</a> |
					<a href="http://file.home.blogbus.com/">文件管理</a>
				</div>
				<div id="menuFriend" style="padding-left: 250px;">
					<a href="http://friend.home.blogbus.com/" class="submenuFriendList">好友列表</a>
					|
					<a href="http://friend.home.blogbus.com/add"
						class="submenuFriendAdd">搜索好友</a> |
					<a href="http://friend.home.blogbus.com/minifeed"
						class="submenuMinifeed">好友新鲜事</a>
				</div>
				<div id="menuTopic" style="padding-left: 350px">
					<a href="http://topic.home.blogbus.com/topics/topicindex"
						class="submenuTopic">活动</a> |
					<a href="http://topic.home.blogbus.com/topics/mytopics"
						class="submenuMyTopic">我参加的活动</a> |
					<a href="http://topic.home.blogbus.com/topics/myaccount"
						class="submenuMyAccount">账户明细</a>
				</div>
			</div>
<script type="text/javascript">
(function (){
$('#allSubMenus').css('display','none');
var _menuEff={};
_menuEff.cur=null;
function switchMenu(id) {
var menu_html = (_menuEff.cur.hasClass('menuBlogClass') && id=='menuBlog' && menu) ? menu : $('#allSubMenus #'+id).html();
$('#appSubMenuBlock').html(menu_html).css('paddingLeft', $('#allSubMenus #'+id).css('paddingLeft'));
}

$('ul.menus li').hover(function(e){
        _menuEff.cur=_menuEff.cur||$('ul.menus li.actived');
        $('ul.menus li').removeClass('actived');
        var id = 'menu'+this.className.match(/menu(\w+)Class/)[1];
        switchMenu(id);
        $(this).addClass('actived');
},
function(e){
        if (e.relatedTarget.tagName!='DIV') {
                return;
        }
        if (_menuEff.cur && !$(e.relatedTarget).hasClass('subMenus')) {
                $('ul.menus li').removeClass('actived');
                _menuEff.cur.addClass('actived');
                var id = _menuEff.cur[0].className.match(/(menu\w+)Class/)[1];
                switchMenu(id);
        }
});
$('div.mainNavi').mouseout(function(e){
        if (_menuEff.cur && e.relatedTarget.id=='wrapper') {
                $('ul.menus li').removeClass('actived');
                _menuEff.cur.addClass('actived');
                var id = _menuEff.cur[0].className.match(/(menu\w+)Class/)[1];
                switchMenu(id);
        }

});
})();
//$('#header').append('<div class="new"></div>');
</script>

			<!--main start-->
			<div class="ajaxInfo" style="display: none;" id="flashMessage">
				<div class="ajaxInfo_1">
					<div class="ajaxInfo_2">
						<div class="ajaxInfo_3">
							<div class="ajaxInfo_4">
								<div class="message"></div>
							</div>
						</div>
					</div>
				</div>
			</div>

<script type="text/javascript">
function showFlashMessage(message,type) {
    el = $('#flashMessage .message');
    if (type=='success') {
        el.addClass('ajaxInfoSuc');
    }
    el.html(message);
    $('#flashMessage').fadeIn();
    setTimeout(function(){$('#flashMessage').fadeOut('fast')}, 3000);
}
</script>
			<script type="text/javascript">
<!--
var menu='<div class="subMenus" id="blog"><a class="submenuNewPost" href="http://blog.home.blogbus.com/6434953/posts/form">写新日志</a> | ' +
'<a class="submenuPost" href="http://blog.home.blogbus.com/6434953/posts">日志</a> | ' +
'<a class="submenuSkin" href="/6434953/skins/blogbus_public_skins">模板</a> | ' +
'<a class="submenuComment" href="http://blog.home.blogbus.com/6434953/comments/items">评论</a> | ' +
'<a class="submenuTrackback" href="http://blog.home.blogbus.com/6434953/trackback">引用</a> | ' +
'<a class="submenuSort" href="http://blog.home.blogbus.com/6434953/categories">分类</a> | ' +
'<a class="submenuTag" href="http://blog.home.blogbus.com/6434953/tags">标签</a> | ' +
'<a class="submenuBlogLink" href="http://blog.home.blogbus.com/6434953/bloglink/items">博链</a> | ' +
'<a class="submenuLink" href="http://blog.home.blogbus.com/6434953/links">友情链接</a> | ' +
'<a class="submenuSetting" href="/6434953/settings/basic">博客设置</a> | ' +
'<a class="submenuStat" href="http://blog.home.blogbus.com/6434953/stat">访问统计</a> | ' +
'<a class="submenuAllBlog" href="http://blog.home.blogbus.com/user_blog/blogs">全部博客</a></div>';

$("#appSubMenuBlock").html(menu).css('paddingLeft', '24px');
$('li.menuBlogClass').addClass('actived');

//-->
</script>
<script type="text/javascript">
$('a.submenuNewPost').addClass('actived');
</script>
<script type="text/javascript" src="../script/tiny_mce.js"></script>
			<script type="text/javascript" src="../script/zh.js"
				onload="tinymce.dom.ScriptLoader._onLoad(this,&#39;http://www.blogbus.com/user/tiny_mce/langs/zh.js&#39;,0);"></script>
			<script type="text/javascript" src="../script/editor_template.js"
				onload="tinymce.dom.ScriptLoader._onLoad(this,&#39;http://www.blogbus.com/user/tiny_mce/themes/advanced/editor_template.js&#39;,1);"></script>
			<script type="text/javascript" src="../script/zh(1).js"></script>
			<script type="text/javascript" src="../script/editor_plugin.js"
				onload="tinymce.dom.ScriptLoader._onLoad(this,&#39;http://www.blogbus.com/user/tiny_mce/plugins/media/editor_plugin.js&#39;,2);"></script>
			<script type="text/javascript" src="../script/editor_plugin(1).js"
				onload="tinymce.dom.ScriptLoader._onLoad(this,&#39;http://www.blogbus.com/user/tiny_mce/plugins/inlinepopups/editor_plugin.js&#39;,3);"></script>
			<!-- /editor -->
			<script type="text/javascript">
var _blog_id = 6434953;
var _post_id = 189602822;
var _editor_status = false;

function insertHtml(str) {
    tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, str);
}

function onMessage(msg){
alert(msg);
}
function getMediaObj(src, width, height, type) {
    if (!type) {
        type = 'Flash';
    }
    return html = ''
        + '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" '
        + ' width="' + width + '"'
        + ' height="' + height + '"'
        + ' border="0" title="src:\'' + src + '\',width:\'' + width + '\',height:\'' + height + '\'" class="mceItem' + type + '" />';
}

function getImageObj(src, basepath, width, height, thumb) {
    width = width ? ' width="' + width + '"' : '';
    height = height ? ' height="' + height + '"' : "";
    var html = '<img src="' + basepath + src + '" '
        + width + height
        + ' border="0"/>';
    if (thumb == 2){
        html = '<a href="' + basepath + 's/' + src  + '" target="_blank">' + html + '</a>';
    }
    return html;
}

</script>

			<div id="innerContainer">
				<!--title start-->
				<h2>
					写日志
					<span class="subCurrent"> 当前博客：<a
						title="在新窗口中查看：达摩克利斯之剑 (http://adolfcc.blogbus.com"
						class="pub_blogName01" target="_blank"
						href="http://adolfcc.blogbus.com/">达摩克利斯之剑</a> </span>
				</h2>
				<!--title end-->
				<!--main start-->
				<%System.out.println("--------------------------------------------"); %>
				<%System.out.println(request.getParameter("info")); %>
				<form method="post"
					action="edit.jsp"
					name="EditorForm">
					<div id="pub_main">
						<!--<div class="noticeInfo" style="margin-left:0; margin-right:0; margin-bottom:15px;">
<p>“文件管理”功能升级，“添加图片”功能暂时不可用。预计周三（5月20日）上午九点恢复，给您带来的不便，敬请谅解！</p>
      </div>-->
						<div id="postWrite">
							<div class="postWrite_r1">
								<div class="postWrite_title">
									<label>
										标题：
									</label>
									<input name="title" type="text" style="width: 410px;"
										class="text" value="不注意讲话时的人称代词" />
								</div>
								<div class="postWrite_time">
									<label>
										时间：
									</label>
									<input type="hidden" id="post_time" name="post_time"
										value="2012-01-30 15:55" />
									<span class="postWrite_currentDate">2012-01-30</span>&nbsp;
									<span class="postWrite_currentTime">15:55</span>
									<span class="postWrite_time_edit pub_dropmenuP"><a
										href="http://blog.home.blogbus.com/6434953/posts/189602822/form#"
										onclick="$(&#39;#dm_postWrite_time_edit&#39;).slideToggle(&#39;fast&#39;);return false;"><img
												class="pub_subLink" src="../image/icon_pencil_s.gif"
												width="16" height="16" alt="修改" />
									</a>
										<div id="dm_postWrite_time_edit" class="pub_dropmenu" style="display: none;">
											<p class="info">
												修改日志发布时间
											</p>
											<p>
												<input type="text" style="width: 75px;" class="text"
													id="txtDate" />
												<input type="text" style="width: 45px;" class="text"
													id="txtTime" />
											</p>
											<div>
												<input type="button" value="确定" id="postDateOk" class="button" />
												<input type="button" value="取消" id="postDateCancel" class="button" />
											</div>
										</div> </span>
								</div>
								<div class="clear"></div>
							</div>
							<div class="postWrite_r2">
								<div class="postWrite_content bgGray">
								<textarea cols="80" id="info" name="info" rows="10">
								<%=request.getParameter("info")==null?"":request.getParameter("info") %>
								</textarea>
								</div>
							</div>
							<div class="postWrite_r3">
								<div class="postWrite_cate">
									<label>
										分类：
									</label>
									<select name="sort_id">
										<option value="">
											选择分类...
										</option>
									</select>
									<span class="postWrite_cate_add"> <a
										href="http://blog.home.blogbus.com/6434953/posts/189602822/form#"
										id="newCate">创建分类</a>
									</span>
								</div>
								<div class="postWrite_tag pub_dropmenuP"
									style="position: relative;">
									<label>
										标签：
									</label>
									<input name="tags" type="text"
										style="width: 300px; background-color: transparent; z-index: 1;"
										class="text pub_subLink" value="">
									<input type="button" class="button" value="自动提取标签"
										id="btn_extract">
									<a href="http://bangzhuzhongxin.blogbus.com/logs/5453025.html"
										title="什么是标签？" target="_blank"><img
											src="../image/icon_help.gif" style="vertical-align: middle;">
									</a>
									<div id="dm_postWrite_tag" class="pub_dropmenu">
										<div class="center">
											<div class="left">
												<h6>
													大家也在关注
												</h6>
												<p>
													<span>潘多拉星球设计方案</span>(
													<a href="http://topic.home.blogbus.com/">最新话题</a>)
												</p>
												<p>
													<span>北京</span>
													<span>世博会</span>
													<span>故乡</span>
													<span>美食</span>
													<span>回忆</span>
													<span>游记</span>
													<span>摄影</span>
													<span>思考</span>
													<span>书评</span>
													<span>时装</span>
												</p>
											</div>
											<div class="right">
												<h6>
													我的常用标签
												</h6>
												<p></p>
											</div>
										</div>
										<a
											href="http://blog.home.blogbus.com/6434953/posts/189602822/form#"
											class="pub_dm_close"
											onclick="$(&#39;#dm_postWrite_tag&#39;).slideUp(&#39;fast&#39;); return false;">×</a>
									</div>
									<div style="position: absolute; left: 43px; top: 2px; height: 21px; width: 304px; line-height: 21px; padding-left: 0.5em; color: rgb(153, 153, 153); z-index: -1; visibility: visible;">
										最多可以加5个标签，用逗号或空格分隔
									</div>
								</div>
								<div class="clear"></div>
							</div>

							<div id="postWrite_advanced" class="bgGray">
									<div class="postWrite_r5">
										<div class="postWrite_private">
											<label>
												阅读权限：
											</label>
											<span class="postWrite_pri_statu">公开</span>
											<span class="postWrite_pri_edit pub_dropmenuP"><a
												href="http://blog.home.blogbus.com/6434953/posts/189602822/form#"
												onclick="$(&#39;#dm_postWrite_pri_edit&#39;).slideToggle(&#39;fast&#39;); return false;"><img
														src="../image/icon_pencil_s(1).gif" width="16" height="16"
														alt="修改" class="pub_subLink" />
											</a>
												<div id="dm_postWrite_pri_edit" class="pub_dropmenu">
													<p class="info">
														修改阅读权限
													</p>
													<ul>
														<li>
															<input type="radio" name="visibility" value="public" id="visi_pub" checked="checked" />
															<label for="visi_pub">
																公开
															</label>
														</li>
														<li>
															<input type="radio" name="visibility" value="hidden" id="visi_hid" />
															<label for="visi_hid">
																隐藏
															</label>
														</li>
														<li>
															<input type="radio" name="visibility" value="password" id="visi_pwd" />
															<label for="visi_pwd">
																密码
															</label>
															<input type="text" style="width: 55px;" class="text" name="password" value="" />
														</li>
													</ul>
													<div>
														<input name="visi_opt" value="public" type="hidden" />
														<input type="button" value="确定" class="button" id="visi_ok" />
														<input type="button" value="取消" class="button" id="visi_cancel" />
													</div>
												</div> </span>
										</div>
										<div class="postWrite_option">
											<input type="checkbox" value="1" name="always_top"
												id="chk_always_top" />
											<label for="chk_always_top">
												日志置顶
											</label>
											<input type="checkbox" value="1" name="allow_comment"
												id="chk_allow_comment" />
											<label for="chk_allow_comment">
												允许评论
											</label>
											<input type="checkbox" value="1" id="chk_allow_trackback"
												name="allow_trackback" />
											<label for="chk_allow_trackback">
												允许引用
											</label>
											<input type="checkbox" value="1" name="allow_auto_link"
												id="chk_allow_auto_link" />
											<label for="chk_allow_auto_link">
												允许自动链接
											</label>
										</div>
										<div class="clear"></div>
									</div>
								</div>
							</div>
							<div class="postWrite_r6">
								<div class="button wmp_button">
									<input name="REQUEST_METHOD" value="PUT" type="hidden" />
									<input name="force" value="0" type="hidden" />
									<input type="submit" value="发布日志" id="btn_pub" />
									<input type="button" value="保存草稿" id="btn_draft" />
								</div>
							</div>
						</div>
				</form>
				<!--main end-->
			</div>

			<div id="sidebar">
				<div class="sidebarTop">
				</div>
				<div class="sidebarBody">
					<h3>
						帮助信息
					</h3>
					<div class="module">
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/4514393.html">在日志中插入图片</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/15691548.html">在日志中插入书籍</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/4514399.html">在日志中插入音/视频</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/4514415.html">缤纷表情任您选</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/12378972.html">滤除讨厌的格式</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/4514402.html">私密日志，贴心保护</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/14751582.html">置顶重要日志</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/16064115.html">发布时机，由您设置</a>
						</p>
						<p>
							<a target="_blank"
								href="http://bangzhuzhongxin.blogbus.com/logs/5452576.html">何谓“受欢迎”的标签</a>
						</p>
					</div>
				</div>
				<div class="sidebarBottom">
				</div>
			</div>

			<div id="addNewCat" style="display: none">
				<table border="0" cellpadding="0" cellspacing="0" class="popup_edit">
					<tbody>
						<tr>
							<th class="height30">
								新分类名称：
							</th>
							<td>
								<input name="name" type="text" style="width: 200px;"
									id="new_sort_name">
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<div class="button">
									<input type="button" value="添加分类"
										onclick="addSort($(&#39;#picobox #new_sort_name&#39;).val());Picobox.hide()">
									<input type="button" onclick="Picobox.hide()" value="取消">
								</div>
							</td>
						</tr>
					</tbody>
				</table>
			</div>

			<script type="text/javascript" src="../script/jquery.cookie.js"></script>
			<script type="text/javascript">
$('#btn_smily').click(function(){
	Picobox.showIFrameBox('插入表情','http://www.blogbus.com/user/view/emotions.html?from=blog.home.blogbus.com', {height:300,width:375});
	return false;
}).css('cursor','pointer');

$('#btn_pic').click(function(){
	Picobox.showIFrameBox('插入图片','http://www.blogbus.com/user/?mm=Bababian&aa=Index&from=blog.home.blogbus.com',{height:490,width:730});return false;
	return false;
}).css('cursor','pointer');

$('#btn_douban').click(function(){
	Picobox.showIFrameBox('插入书籍','http://www.blogbus.com/user/?mm=Douban&aa=Browser&from=blog.home.blogbus.com',{height:460,width:700});
	return false;
}).css('cursor','pointer');

function addSort(sortname) {
    if (sortname!=null && sortname=='') {
        return;
    }
    $.post("http://blog.home.blogbus.com/6434953/categories?json=1", {"name": sortname},
		function (json) {
			if (json.success) {
				var id = json.success.id;
				$('select[name=sort_id]').append(new Option(sortname, id)).val(id);
			}
		}, 'json'
	);
}  
function updatePostDate() {
	var arr_datetime = $('#post_time').val().split(/[ ]+/);
	$('#txtDate').val(arr_datetime[0]);
	$('#txtTime').val(arr_datetime[1]);
	$('span.postWrite_currentDate').text(arr_datetime[0]);
	$('span.postWrite_currentTime').text(arr_datetime[1]);
}
updatePostDate();
$('#postDateOk').click(function(){
	var datetime = $.trim($('#txtDate').val()+' '+$('#txtTime').val());
	$('#post_time').val(datetime);
	updatePostDate();
	$('#dm_postWrite_time_edit').slideUp('fast');
});
$('#postDateCancel').click(function(){
	$('#dm_postWrite_time_edit').slideUp('fast');
	updatePostDate();
});  
var edit_form = document.EditorForm;
var visi_names = {'public':'公开','hidden':'隐藏','password':'加密'}
$('#visi_ok').click(function () {
	var value = $(edit_form).find('.postWrite_private input:radio:checked').val();
	edit_form.visi_opt.value = value;
	$(edit_form).find('span.postWrite_pri_statu').text(visi_names[value]);
	if (value == 'hidden') {
		$('#chk_always_top').attr('checked', false).attr('disabled', true);
	} else {
		$('#chk_always_top').attr('disabled', false);
	}
	$('#dm_postWrite_pri_edit').slideUp('fast');
});
$('#visi_cancel').click(function () {
	var value = edit_form.visi_opt.value;
	$('#dm_postWrite_pri_edit').slideUp('fast');
	$(edit_form).find('.postWrite_private input:radio').each(function(){
	if (this.value==value){
		this.checked=true;
	}
	});
	if (value == 'hidden') {
		$('#chk_always_top').attr('checked', false).attr('disabled', true);
	} else {
		$('#chk_always_top').attr('disabled', false);
	}
	$(edit_form).find('span.postWrite_pri_statu').text(visi_names[value]);
});
$('#visi_cancel').click();

$('select[name=sort_id]').val(4167656);

$('input[name=tags]').click(function(){$('#dm_postWrite_tag').slideDown('fast');return false;});
function hint(input, str) {
	var n_hint = $('<div></div>').css({
		'position': 'absolute',
		'left':input.offsetLeft,
		'top':input.offsetTop,
		'height':input.offsetHeight,
		'width':input.offsetWidth,
		'lineHeight':input.offsetHeight+'px',
		'paddingLeft':'0.5em',
		'color':'#999',
		'zIndex':-1
	}).text(str).click(function(){$(input).focus().click();return false;});
	$(input).parent().css('position', 'relative').append(n_hint);
	var _hint=function(o){
		var v=o.value?o.value:this.value;
		if (v=='' || v==undefined){
			n_hint.css('visibility','visible');
		} else {
			n_hint.css('visibility','hidden');
		}
	};
	$(input).css({'backgroundColor':'transparent','zIndex':1}).focus(function(){n_hint.css('visibility','hidden');}).blur(_hint).change(_hint);
	_hint(input);
}
hint($('input[name=tags]')[0], '最多可以加5个标签，用逗号或空格分隔');
$('#btn_extract').click(function() {
$('#btn_extract').attr('disabled', true);
var data = {
	'title':edit_form.title.value,
	'content':tinyMCE.editors.content.getContent(),
	'REQUEST_METHOD':'GET'
};
var url="/posts/extract_tags";
$.post(url, data, function(ret){
	$('#btn_extract').attr('disabled', false);
	if (!ret.tags) {
		return;
	}
	$('input[name=tags]').val(ret.tags.join(' ')).change();
}, 'json');
});
$('#dm_postWrite_tag').find('span').mousedown(function(){
	var tags = $('.postWrite_tag input:text').val().split(/[\s　]+/g);
	var t = [];
	var new_tag =$(this).text();
	for (var i=0; i<tags.length;i++) {
		if (tags[i]=='') {
			continue;
		}
		if (tags[i]==new_tag) {
			return;
		}
		t.push(tags[i]);
	}
	if (t.length >= 5) {
		alert('最多可以填入5个标签');
		return;
	}
	tags = t;
	tags.push(new_tag);
	$('input[name=tags]').val(tags.join(' ')).change();
});

$('#ln_copy_content').click(function(){
tinyMCE.getInstanceById('excerpt').setContent(tinyMCE.getInstanceById('content').getContent());
return false;
});
$('#chk_allow_comment').attr('checked', true);
$('#chk_allow_trackback').attr('checked', true);
$('#chk_allow_auto_link').attr('checked', true);


//
//if (_draftid != 0 && edit_form.ID.value != 0) {
//	$('#autosavemsg').html('此篇日志已保存在草稿，<a href="javascript: recovery('+ _draftid +')">点击导入</a>');
//}
$('#postWrite_advanced div.postWrite_advanced_title').click(function(){
	$('.postWrite_advanced_content').slideToggle('fast', function(){
	$.cookie('bus.editor.showAdv', $('.postWrite_advanced_content').css('display'), {path:'/',expires:365});
	});
});
$('.postWrite_advanced_content').css('display', $.cookie('bus.editor.showAdv')||'none');

$(edit_form).submit(function(){return false;});
function post() {
if($.trim(edit_form.title.value)=='') {
	alert('您还没有填写标题');
	return;
}
$('#btn_pub').attr('disabled', true);
edit_form.content.value=tinyMCE.editors.content.getContent();
edit_form.excerpt.value=tinyMCE.editors.excerpt.getContent();
var data = $(edit_form).serialize();
'url':edit_form.action,'data':data,'type':'POST','dataType':'json',
'success':function(ret){
	if (ret.success) {
		location.href = 'http://blog.home.blogbus.com/'+_blog_id+'/posts';
		return;
	} else if(ret.failure.bad) {
		if (confirm("您提交的日志中存在敏感词汇，若您确定发布，该日志将被暂时锁定，审核通过后即可正常显示，请耐心等待。您也可选择“取消”，去除敏感词汇后再提交。\n为了维护博客大巴网络和谐，请避免涉及政治或低俗内容，感谢配合。")) {
			edit_form.force.value = 1;
			post();
		}
	} else if (ret.failure.message) {
	    alert(ret.failure.message);
	}
	$('#btn_pub').attr('disabled', false);
},
'error':function(xhr, status){
	var ret=(new Function('return '+xhr.responseText))();
	if (ret.failure.message){
		alert(ret.failure.message);
	}
	$('#btn_pub').attr('disabled', false);
}
});
}
$('#btn_pub').click(post);

var draft_id=0;
function draft() {
var content=tinyMCE.editors.content.getContent();
if (content=='' || edit_form.content.value==content) {
	return;
}
if (draft.lock){return;};
draft.lock=true;
$('#btn_draft').attr('disabled', true);
edit_form.content.value=content;
var data = {
	'title':edit_form.title.value,
	'content':edit_form.content.value,
	'post_time':edit_form.post_time.value,
	'post_id':_post_id,
	'draft_id':draft_id
};
var url="/6434953/posts/draft";
$.post(url, data, function(ret){
	$('#btn_draft').attr('disabled', false);
	if (ret.success) {
		var time=(new Date()).toTimeString().replace(/:[^:]+$/, '');
		$('span.draftSave').text(time+'保存到草稿');
		if (ret.success.id) {
			draft_id=ret.success.id;
		}
	}
	draft.lock=false;
}, 'json');
}

$('#btn_draft').click(draft);
setInterval(draft, 60000*5);
$(document).unload(function(){
});
$('#newCate').click(function(){
	Picobox.showDOMBox('创建分类','#addNewCat',{width:330,height:120});

	return false;
});
</script>
			<!--main end-->

			<div id="footer">
				<p>
					Copyright 2002-2012 BlogBus.com, All Rights Reserved. 博客大巴版权所有
				</p>
			</div>
		</div>
		<script type="text/javascript">
$('body').click(function(e){
if(!$(e.target).hasClass('pub_subLink') && !$(e.target).parents().hasClass('pub_dropmenu')){
$('.pub_dropmenu').slideUp('fast');
}
})
</script>
<script type="text/javascript" src="./notice_msg"></script>
<script type="text/javascript" src="./head_script"></script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="../script/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2120146-1");
pageTracker._setDomainName(".blogbus.com");
pageTracker._addOrganic("baidu","word");
pageTracker._addOrganic("baidu","wd");
pageTracker._addOrganic("soso","w");
pageTracker._addOrganic("vnet","kw");
pageTracker._initData();
pageTracker._trackPageview();
</script>



<div id="picoboxMask" style="height: 800px; width: 1280px; "></div><div id="picobox" style="display:none;"><table style="width:100%;height:100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="rc_lt"></td><td class="top"></td><td class="rc_rt"></td></tr><tr><td class="left"></td><td class="content"><div id="picoboxInner"><h1 class="picoboxTitle"><div><span></span><a href="http://blog.home.blogbus.com/6434953/posts/189602822/form#" onclick="Picobox.hide();return false;" class="close">X</a></div></h1><div class="picoboxBody"></div></div></td><td class="right"></td></tr><tr><td class="rc_lb"></td><td class="bottom"></td><td class="rc_rb"></td></tr></tbody></table></div>
<ckeditor:replace  replace="info" basePath="../ckeditor/" />
</body>
<% 
try{
result.close();
statement.close();
connection.close();
}catch(Exception ex){
	ex.printStackTrace();
}
%>
</html>
